package com.dingup.homework.enums;

/**
 * Created by yanggavin on 16/8/8.
 */
public enum HomeworkRecordStatusEnum {
    WAITING("WAITING", "等待作答"),
    FAIL("FAIL", "未达标"),
    FINISHED("FINISHED", "学生完成作答"),
    CORRECTED("CORRECTED", "老师完成批改");

    private final String code;
    private final String des;

    HomeworkRecordStatusEnum(String code, String des) {
        this.code = code;
        this.des = des;
    }

    public static Boolean contains(String name) {
        for (HomeworkRecordStatusEnum e : values()) {
            if (e.name().equals(name)) {
                return true;
            }
        }
        return false;
    }

    public String getCode() {
        return code;
    }

    public String getDes() {
        return des;
    }
}
